﻿using Resn.WhuPub.BIL;
using Resn.WhuPub.DML;
using System;

namespace Resn.WhuPub.BLL
{
        /// <summary>
        /// 实现联系人反馈的属性和方法
        /// </summary>
        public class Feedback :Entity, IFeedback
        {
                #region 构造函数
                public Feedback(FeedbackModel model)
                {
                        Model = model;
                }
                #endregion
                #region 属性

                #region 基本属性

               

                /// <summary>
                /// 获取或设置联系人标识
                /// </summary>
                /// <value>
                /// 联系人标识
                /// </value>
                public string ContactId
                {
                        get
                        {
                                return Model.ContactId;
                        }
                }

                /// <summary>
                /// 获取或设置反馈类型
                /// </summary>
                /// <value>
                /// 反馈类型
                /// </value>
                public FeedbackType FeedbackType
                {
                        get
                        {
                                return (FeedbackType)Enum.Parse(typeof(FeedbackType), Model.FeedbackType);
                        }
                        set
                        {
                                Model.FeedbackType = value.ToString();
                        }
                }

                /// <summary>
                /// 获取或设置反馈内容
                /// </summary>
                /// <value>
                /// 反馈内容
                /// </value>
                public string FeedbackContent
                {
                        get
                        {
                                return Model.FeedbackContent;
                        }
                        set
                        {
                                Model.FeedbackContent = value;
                        }
                }

                /// <summary>
                /// 获取录入员工标识
                /// </summary>
                /// <value>
                /// 员工标识
                /// </value>
                public string EnteringEmployeeId
                {
                        get
                        {
                                return Model.EnteringEmployeeId;
                        }
                }

                /// <summary>
                /// 获取或设置录入时间
                /// </summary>
                /// <value>
                /// 录入时间
                /// </value>
                public DateTime EnteringTime
                {
                        get
                        {
                                return Model.EnteringTime;
                        }
                }

                /// <summary>
                /// 获取或设置审批员工标识
                /// </summary>
                /// <value>
                /// 审批员工标识
                /// </value>
                public string ApproveEmployeeId
                {
                        get
                        {
                                return Model.ApproveEmployeeId;
                        }
                        set
                        {
                                Model.ApproveEmployeeId = value;
                        }
                }

                /// <summary>
                /// 获取或设置审批时间
                /// </summary>
                /// <value>
                /// 审批时间
                /// </value>
                public DateTime ApproveTime
                {
                        get
                        {
                                return Model.ApproveTime;
                        }
                        set
                        {
                                Model.ApproveTime = value;
                        }
                }

                /// <summary>
                /// 获取或设置审批意见
                /// </summary>
                /// <value>
                /// 审批意见
                /// </value>
                public string ApproveContent
                {
                        get
                        {
                                return Model.ApproveContent;
                        }
                        set
                        {
                                Model.ApproveContent = value;
                        }
                }

                #endregion 基本属性

                /// <summary>
                /// 获取反馈模型
                /// </summary>
                /// <value>
                /// 反馈模型
                /// </value>
                public FeedbackModel Model { get; private set; }

                #endregion 属性

                #region 方法

                /// <summary>
                /// 获取指定标识的对象
                /// </summary>
                /// <param name="id">标识</param>
                /// <returns></returns>
                public static Feedback Select(string id)
                {
                        return Select<Feedback, FeedbackModel>(id);
                }

                #endregion

        }
}